.class public Les/sf0;
.super Les/nf0;
.source "FinderDialog.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Les/sf0$k;,
        Les/sf0$l;
    }
.end annotation


# instance fields
.field b:I

.field c:Lcom/jecelyin/editor/v2/ui/b;

.field d:Ljava/lang/CharSequence;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 0

    .line 1
    invoke-direct {p0, p1}, Les/nf0;-><init>(Landroid/content/Context;)V

    const/4 p1, 0x0

    .line 2
    iput p1, p0, Les/sf0;->b:I

    return-void
.end method

.method public static a(Lcom/jecelyin/editor/v2/ui/b;)V
    .locals 2

    .line 2
    new-instance v0, Les/sf0;

    invoke-virtual {p0}, Lcom/jecelyin/editor/v2/ui/b;->b()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Les/sf0;-><init>(Landroid/content/Context;)V

    const/4 v1, 0x0

    .line 3
    iput v1, v0, Les/sf0;->b:I

    .line 4
    iput-object p0, v0, Les/sf0;->c:Lcom/jecelyin/editor/v2/ui/b;

    .line 5
    new-instance v1, Les/sf0$b;

    invoke-direct {v1, v0}, Les/sf0$b;-><init>(Les/sf0;)V

    invoke-virtual {p0, v1}, Lcom/jecelyin/editor/v2/ui/b;->a(Lcom/jecelyin/editor/v2/widget/text/c;)V

    return-void
.end method

.method private a(Lcom/jecelyin/editor/v2/utils/ExtGrep;Ljava/lang/String;)V
    .locals 0

    .line 33
    invoke-virtual {p0}, Les/nf0;->b()Lcom/jecelyin/editor/v2/ui/JeEditorActivity;

    move-result-object p2

    invoke-virtual {p2}, Lcom/jecelyin/editor/v2/ui/JeEditorActivity;->A()Lcom/jecelyin/editor/v2/ui/g;

    move-result-object p2

    invoke-virtual {p2, p1}, Lcom/jecelyin/editor/v2/ui/g;->a(Lcom/jecelyin/editor/v2/utils/ExtGrep;)Z

    return-void
.end method

.method private a(Les/sf0$l;)Z
    .locals 10

    .line 6
    iget-object v0, p1, Les/sf0$l;->a:Landroid/widget/EditText;

    invoke-virtual {v0}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v2

    .line 7
    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    const/4 v1, 0x0

    if-eqz v0, :cond_0

    .line 8
    iget-object p1, p1, Les/sf0$l;->a:Landroid/widget/EditText;

    iget-object v0, p0, Les/nf0;->a:Landroid/content/Context;

    sget v2, Lcom/jecelyin/editor/v2/m;->je_cannot_be_empty:I

    invoke-virtual {v0, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p1, v0}, Landroid/widget/EditText;->setError(Ljava/lang/CharSequence;)V

    return v1

    .line 9
    :cond_0
    iget-object v0, p1, Les/sf0$l;->f:Landroid/widget/CheckBox;

    invoke-virtual {v0}, Landroid/widget/CheckBox;->isChecked()Z

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, p1, Les/sf0$l;->b:Landroid/widget/EditText;

    invoke-virtual {v0}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    goto :goto_0

    :cond_1
    const/4 v0, 0x0

    :goto_0
    move-object v3, v0

    .line 10
    iget-object v0, p1, Les/sf0$l;->j:Landroid/widget/CheckBox;

    invoke-virtual {v0}, Landroid/widget/CheckBox;->isChecked()Z

    move-result v0

    .line 11
    iget-object v4, p1, Les/sf0$l;->k:Landroid/widget/EditText;

    invoke-virtual {v4}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v4

    if-eqz v0, :cond_3

    .line 12
    invoke-static {v4}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v5

    if-eqz v5, :cond_2

    .line 13
    iget-object p1, p1, Les/sf0$l;->k:Landroid/widget/EditText;

    iget-object v0, p0, Les/nf0;->a:Landroid/content/Context;

    sget v2, Lcom/jecelyin/editor/v2/m;->je_cannot_be_empty:I

    invoke-virtual {v0, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p1, v0}, Landroid/widget/EditText;->setError(Ljava/lang/CharSequence;)V

    return v1

    .line 14
    :cond_2
    new-instance v5, Ljava/io/File;

    invoke-direct {v5, v4}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v5}, Ljava/io/File;->exists()Z

    move-result v5

    if-nez v5, :cond_3

    .line 15
    iget-object p1, p1, Les/sf0$l;->k:Landroid/widget/EditText;

    iget-object v0, p0, Les/nf0;->a:Landroid/content/Context;

    sget v2, Lcom/jecelyin/editor/v2/m;->je_path_not_exists:I

    invoke-virtual {v0, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p1, v0}, Landroid/widget/EditText;->setError(Ljava/lang/CharSequence;)V

    return v1

    .line 16
    :cond_3
    iget-object v5, p1, Les/sf0$l;->i:Landroid/widget/CheckBox;

    invoke-virtual {v5}, Landroid/widget/CheckBox;->isChecked()Z

    move-result v6

    if-eqz v6, :cond_4

    .line 17
    :try_start_0
    invoke-static {v2}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;
    :try_end_0
    .catch Ljava/util/regex/PatternSyntaxException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_1

    :catch_0
    move-exception v0

    .line 18
    iget-object p1, p1, Les/sf0$l;->a:Landroid/widget/EditText;

    invoke-virtual {v0}, Ljava/util/regex/PatternSyntaxException;->getLocalizedMessage()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p1, v0}, Landroid/widget/EditText;->setError(Ljava/lang/CharSequence;)V

    return v1

    .line 19
    :cond_4
    :goto_1
    invoke-static {}, Lcom/jecelyin/editor/v2/utils/e;->e()Lcom/jecelyin/editor/v2/utils/e;

    move-result-object v5

    .line 20
    iget-object v7, p1, Les/sf0$l;->g:Landroid/widget/CheckBox;

    invoke-virtual {v7}, Landroid/widget/CheckBox;->isChecked()Z

    move-result v7

    if-nez v7, :cond_5

    .line 21
    invoke-virtual {v5}, Lcom/jecelyin/editor/v2/utils/e;->b()Lcom/jecelyin/editor/v2/utils/e;

    .line 22
    :cond_5
    iget-object v8, p1, Les/sf0$l;->h:Landroid/widget/CheckBox;

    invoke-virtual {v8}, Landroid/widget/CheckBox;->isChecked()Z

    move-result v8

    if-eqz v8, :cond_6

    .line 23
    invoke-virtual {v5}, Lcom/jecelyin/editor/v2/utils/e;->d()Lcom/jecelyin/editor/v2/utils/e;

    .line 24
    :cond_6
    invoke-virtual {v5, v2, v6}, Lcom/jecelyin/editor/v2/utils/e;->a(Ljava/lang/String;Z)Lcom/jecelyin/editor/v2/utils/e;

    if-eqz v0, :cond_8

    .line 25
    iget-object p1, p1, Les/sf0$l;->m:Landroid/widget/CheckBox;

    invoke-virtual {p1}, Landroid/widget/CheckBox;->isChecked()Z

    move-result p1

    if-eqz p1, :cond_7

    .line 26
    invoke-virtual {v5}, Lcom/jecelyin/editor/v2/utils/e;->c()Lcom/jecelyin/editor/v2/utils/e;

    .line 27
    :cond_7
    invoke-virtual {v5, v4}, Lcom/jecelyin/editor/v2/utils/e;->a(Ljava/lang/String;)Lcom/jecelyin/editor/v2/utils/e;

    .line 28
    :cond_8
    invoke-virtual {v5}, Lcom/jecelyin/editor/v2/utils/e;->a()Lcom/jecelyin/editor/v2/utils/ExtGrep;

    move-result-object p1

    .line 29
    iget-object v4, p0, Les/nf0;->a:Landroid/content/Context;

    invoke-static {v4}, Lcom/jecelyin/editor/v2/utils/b;->a(Landroid/content/Context;)Lcom/jecelyin/editor/v2/utils/b;

    move-result-object v4

    invoke-virtual {v4, v2, v1}, Lcom/jecelyin/editor/v2/utils/b;->a(Ljava/lang/String;Z)V

    .line 30
    iget-object v1, p0, Les/nf0;->a:Landroid/content/Context;

    invoke-static {v1}, Lcom/jecelyin/editor/v2/utils/b;->a(Landroid/content/Context;)Lcom/jecelyin/editor/v2/utils/b;

    move-result-object v1

    const/4 v9, 0x1

    invoke-virtual {v1, v3, v9}, Lcom/jecelyin/editor/v2/utils/b;->a(Ljava/lang/String;Z)V

    if-eqz v0, :cond_9

    .line 31
    invoke-direct {p0, p1, v3}, Les/sf0;->a(Lcom/jecelyin/editor/v2/utils/ExtGrep;Ljava/lang/String;)V

    goto :goto_2

    .line 32
    :cond_9
    iget-object p1, p0, Les/sf0;->c:Lcom/jecelyin/editor/v2/ui/b;

    iget-object v1, p1, Lcom/jecelyin/editor/v2/ui/b;->b:Lcom/jecelyin/editor/v2/widget/text/EditAreaView;

    move v4, v7

    move v5, v8

    invoke-virtual/range {v1 .. v6}, Lcom/jecelyin/editor/v2/widget/text/EditAreaView;->a(Ljava/lang/String;Ljava/lang/String;ZZZ)V

    :goto_2
    return v9
.end method

.method static synthetic a(Les/sf0;Les/sf0$l;)Z
    .locals 0

    .line 1
    invoke-direct {p0, p1}, Les/sf0;->a(Les/sf0$l;)Z

    move-result p0

    return p0
.end method


# virtual methods
.method public c()V
    .locals 8

    .line 1
    iget-object v0, p0, Les/nf0;->a:Landroid/content/Context;

    invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    sget v1, Lcom/jecelyin/editor/v2/k;->je_search_replace:I

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    .line 2
    new-instance v1, Les/sf0$l;

    invoke-direct {v1, v0}, Les/sf0$l;-><init>(Landroid/view/View;)V

    .line 3
    new-instance v2, Les/sf0$c;

    invoke-direct {v2, p0, v1}, Les/sf0$c;-><init>(Les/sf0;Les/sf0$l;)V

    .line 4
    iget-object v3, v1, Les/sf0$l;->d:Landroid/view/View;

    invoke-virtual {v3, v2}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 5
    iget-object v3, v1, Les/sf0$l;->e:Landroid/view/View;

    invoke-virtual {v3, v2}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 6
    iget-object v2, p0, Les/sf0;->d:Ljava/lang/CharSequence;

    const/4 v3, 0x0

    if-eqz v2, :cond_1

    .line 7
    iget-object v4, v1, Les/sf0$l;->a:Landroid/widget/EditText;

    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v2

    const/16 v5, 0x2710

    if-le v2, v5, :cond_0

    iget-object v2, p0, Les/sf0;->d:Ljava/lang/CharSequence;

    .line 8
    invoke-interface {v2, v3, v5}, Ljava/lang/CharSequence;->subSequence(II)Ljava/lang/CharSequence;

    move-result-object v2

    goto :goto_0

    :cond_0
    iget-object v2, p0, Les/sf0;->d:Ljava/lang/CharSequence;

    .line 9
    :goto_0
    invoke-virtual {v4, v2}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 10
    :cond_1
    iget-object v2, p0, Les/nf0;->a:Landroid/content/Context;

    invoke-static {v2}, Lcom/jecelyin/editor/v2/d;->a(Landroid/content/Context;)Lcom/jecelyin/editor/v2/d;

    move-result-object v2

    invoke-virtual {v2}, Lcom/jecelyin/editor/v2/d;->x()Z

    move-result v2

    const/4 v4, 0x1

    const/16 v5, 0x8

    if-eqz v2, :cond_2

    .line 11
    iget-object v2, v1, Les/sf0$l;->f:Landroid/widget/CheckBox;

    invoke-virtual {v2, v5}, Landroid/widget/CheckBox;->setVisibility(I)V

    .line 12
    iget-object v2, v1, Les/sf0$l;->c:Landroid/view/View;

    invoke-virtual {v2, v5}, Landroid/view/View;->setVisibility(I)V

    goto :goto_3

    .line 13
    :cond_2
    iget-object v2, v1, Les/sf0$l;->f:Landroid/widget/CheckBox;

    new-instance v6, Les/sf0$d;

    invoke-direct {v6, p0, v1}, Les/sf0$d;-><init>(Les/sf0;Les/sf0$l;)V

    invoke-virtual {v2, v6}, Landroid/widget/CheckBox;->setOnCheckedChangeListener(Landroid/widget/CompoundButton$OnCheckedChangeListener;)V

    .line 14
    iget-object v2, v1, Les/sf0$l;->f:Landroid/widget/CheckBox;

    iget v6, p0, Les/sf0;->b:I

    if-ne v6, v4, :cond_3

    const/4 v6, 0x1

    goto :goto_1

    :cond_3
    const/4 v6, 0x0

    :goto_1
    invoke-virtual {v2, v6}, Landroid/widget/CheckBox;->setChecked(Z)V

    .line 15
    iget-object v2, v1, Les/sf0$l;->c:Landroid/view/View;

    iget v6, p0, Les/sf0;->b:I

    if-ne v6, v4, :cond_4

    const/4 v6, 0x0

    goto :goto_2

    :cond_4
    const/16 v6, 0x8

    :goto_2
    invoke-virtual {v2, v6}, Landroid/view/View;->setVisibility(I)V

    .line 16
    :goto_3
    iget-object v2, v1, Les/sf0$l;->n:Landroid/view/View;

    iget v6, p0, Les/sf0;->b:I

    const/4 v7, 0x2

    if-ne v6, v7, :cond_5

    const/4 v6, 0x0

    goto :goto_4

    :cond_5
    const/16 v6, 0x8

    :goto_4
    invoke-virtual {v2, v6}, Landroid/view/View;->setVisibility(I)V

    .line 17
    iget-object v2, v1, Les/sf0$l;->m:Landroid/widget/CheckBox;

    iget v6, p0, Les/sf0;->b:I

    if-ne v6, v7, :cond_6

    const/4 v5, 0x0

    :cond_6
    invoke-virtual {v2, v5}, Landroid/widget/CheckBox;->setVisibility(I)V

    .line 18
    iget-object v2, v1, Les/sf0$l;->j:Landroid/widget/CheckBox;

    iget v5, p0, Les/sf0;->b:I

    if-ne v5, v7, :cond_7

    const/4 v3, 0x1

    :cond_7
    invoke-virtual {v2, v3}, Landroid/widget/CheckBox;->setChecked(Z)V

    .line 19
    iget-object v2, v1, Les/sf0$l;->j:Landroid/widget/CheckBox;

    new-instance v3, Les/sf0$e;

    invoke-direct {v3, p0, v1}, Les/sf0$e;-><init>(Les/sf0;Les/sf0$l;)V

    invoke-virtual {v2, v3}, Landroid/widget/CheckBox;->setOnCheckedChangeListener(Landroid/widget/CompoundButton$OnCheckedChangeListener;)V

    .line 20
    invoke-virtual {p0}, Les/nf0;->b()Lcom/jecelyin/editor/v2/ui/JeEditorActivity;

    move-result-object v2

    new-instance v3, Les/sf0$f;

    invoke-direct {v3, p0, v1}, Les/sf0$f;-><init>(Les/sf0;Les/sf0$l;)V

    invoke-virtual {v2, v3}, Lcom/jecelyin/editor/v2/ui/JeEditorActivity;->a(Les/sf0$k;)V

    .line 21
    iget-object v2, v1, Les/sf0$l;->l:Landroid/view/View;

    new-instance v3, Les/sf0$g;

    invoke-direct {v3, p0}, Les/sf0$g;-><init>(Les/sf0;)V

    invoke-virtual {v2, v3}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 22
    iget-object v2, p0, Les/sf0;->c:Lcom/jecelyin/editor/v2/ui/b;

    invoke-virtual {v2}, Lcom/jecelyin/editor/v2/ui/b;->f()Ljava/lang/String;

    move-result-object v2

    if-eqz v2, :cond_8

    .line 23
    iget-object v2, v1, Les/sf0$l;->k:Landroid/widget/EditText;

    new-instance v3, Ljava/io/File;

    iget-object v4, p0, Les/sf0;->c:Lcom/jecelyin/editor/v2/ui/b;

    invoke-virtual {v4}, Lcom/jecelyin/editor/v2/ui/b;->f()Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3}, Ljava/io/File;->getParent()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 24
    :cond_8
    iget-object v2, v1, Les/sf0$l;->i:Landroid/widget/CheckBox;

    new-instance v3, Les/sf0$h;

    invoke-direct {v3, p0}, Les/sf0$h;-><init>(Les/sf0;)V

    invoke-virtual {v2, v3}, Landroid/widget/CheckBox;->setOnCheckedChangeListener(Landroid/widget/CompoundButton$OnCheckedChangeListener;)V

    .line 25
    invoke-virtual {p0}, Les/nf0;->a()Lcom/jecelyin/common/widget/dialog/a$c;

    move-result-object v2

    sget v3, Lcom/jecelyin/editor/v2/m;->je_find_replace:I

    invoke-virtual {v2, v3}, Lcom/jecelyin/common/widget/dialog/a$c;->f(I)Lcom/jecelyin/common/widget/dialog/a$c;

    invoke-virtual {v2, v0}, Lcom/jecelyin/common/widget/dialog/a$c;->a(Landroid/view/View;)Lcom/jecelyin/common/widget/dialog/a$c;

    sget v0, Lcom/jecelyin/editor/v2/m;->action_close:I

    invoke-virtual {v2, v0}, Lcom/jecelyin/common/widget/dialog/a$c;->b(I)Lcom/jecelyin/common/widget/dialog/a$c;

    sget v0, Lcom/jecelyin/editor/v2/m;->je_find:I

    .line 26
    invoke-virtual {v2, v0}, Lcom/jecelyin/common/widget/dialog/a$c;->d(I)Lcom/jecelyin/common/widget/dialog/a$c;

    new-instance v0, Les/sf0$j;

    invoke-direct {v0, p0}, Les/sf0$j;-><init>(Les/sf0;)V

    invoke-virtual {v2, v0}, Lcom/jecelyin/common/widget/dialog/a$c;->a(Landroid/content/DialogInterface$OnClickListener;)Lcom/jecelyin/common/widget/dialog/a$c;

    new-instance v0, Les/sf0$i;

    invoke-direct {v0, p0, v1}, Les/sf0$i;-><init>(Les/sf0;Les/sf0$l;)V

    .line 27
    invoke-virtual {v2, v0}, Lcom/jecelyin/common/widget/dialog/a$c;->c(Landroid/content/DialogInterface$OnClickListener;)Lcom/jecelyin/common/widget/dialog/a$c;

    .line 28
    invoke-virtual {v2}, Lcom/jecelyin/common/widget/dialog/a$c;->c()Lcom/jecelyin/common/widget/dialog/a;

    move-result-object v0

    .line 29
    new-instance v1, Les/sf0$a;

    invoke-direct {v1, p0}, Les/sf0$a;-><init>(Les/sf0;)V

    invoke-virtual {v0, v1}, Landroid/app/Dialog;->setOnDismissListener(Landroid/content/DialogInterface$OnDismissListener;)V

    .line 30
    invoke-virtual {p0, v0}, Les/nf0;->a(Lcom/jecelyin/common/widget/dialog/a;)V

    return-void
.end method
